package D2;

import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;

public class Java13 {
    public static void main(String[] args) {
        LocalDateTime S = LocalDateTime.of(2024,10,10,10,10,10);
        LocalDateTime E = LocalDateTime.of(2024,12,10,10,10,10);
                //得到Duration对象
        Duration d = Duration.between(S,E);
        //获取两个时间对象间隔的信息
        System.out.println(d.toDays());
        System.out.println(d.toMillis());
    }
}
